const myTarget = {};

const proxy = new Proxy(myTarget, {
    preventExtensions(target) {
        console.log('preventExtensions()');
        return Reflect.isExtensible(target);
    }
});

Object.preventExtensions(proxy);